package com.example.demo.mapper;

import com.example.demo.model.Car;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ling
 * Date: 2023-09-22
 * Time: 9:43
 */
@Mapper
public interface CarMapper {
    //添加一条记录
    public int insertCar(@Param("brand")String brand,@Param("owner")String owner,@Param("telephone")String telephone);

    //基于车牌号
    public Car selectCarById(@Param("carId")int carId);

    //基于品牌
    public List<Car> selectCarByBrand(@Param("brand")String brand);

    //基于车牌号修改电话号码
    public int updateTelByCarId(@Param("carId")int carId,@Param("tel")String tel);

    //基于车牌号删除记录
    public int delByCarId(@Param("carId")int carId);

}
